//
//  BYSaveCacheData.m
//  ZhiHuiLiJiang
//
//  Created by 胡忠诚 on 2018/11/21.
//  Copyright © 2018 WisdomLijiang. All rights reserved.
//本地存储数据

#import "BYSaveCacheData.h"

@implementation BYSaveCacheData
BYSingtonM(BYSaveCacheData)

//存储NSString到偏好设置
- (void)saveDataStr:(NSString *)DataStr withKey:(NSString *)keyStr{
    NSString *phoneNumStr = [[NSUserDefaults standardUserDefaults] objectForKey:currentUserPhone];
    keyStr = [NSString stringWithFormat:@"userInfo_%@_%@",phoneNumStr,keyStr];
    [[NSUserDefaults standardUserDefaults] setObject:DataStr forKey:keyStr];
    [[NSUserDefaults standardUserDefaults] synchronize];
}
- (NSString *)loadDataStrWithKey:(NSString *)keyStr{
    NSString *phoneNumStr = [[NSUserDefaults standardUserDefaults] objectForKey:currentUserPhone];
    keyStr = [NSString stringWithFormat:@"userInfo_%@_%@",phoneNumStr,keyStr];
    return [[NSUserDefaults standardUserDefaults] objectForKey:keyStr];
}


@end
